#include <iostream>  
using namespace std; 
int num1;
void FindNumsAppearOnce(int data[], int length)  
{   
    if (length < 2)  
        return;  
    int resultExclusiveOR = 0;  
    for (int i = 0; i < length; ++ i)  
        resultExclusiveOR ^= data[i];  
        num1=resultExclusiveOR ;  
} 
int main()  
{
	int data;
	cin>>data;
	int arr[data]; 
	for(int d=0;d<data;d++)
	{
		cin>>arr[d];
	}
	FindNumsAppearOnce(arr,data);
	cout<<num1<<endl;
	return 0;  
}
